<#escape x as x?html>
{
	"records":"${records!"0"}",
	"page":"${page!"1"}",
	"pageSize":"${pageSize!"0"}",
	"pageCount":"${pageCount!"0"}",
	"rows":[
		<#list rows as row>
			{
				"id":"${row.id}",
				"createTime":"${row.createTime}",
				"userNo":"${row.userNo!""}",
				<#if row.userName?length gt 6>  
    				"userName":"${row.userName?substring(0,6)}...",
				<#else>
					"userName":"${row.userName!""}", 
				</#if>
				"accountOpenId":"${row.accountOpenId!""}",
				"defaultTallyAccountId":"${row.defaultTallyAccountId!""}",
				<#list row.tallyAccountInfo as accountInfo>
					<#if accountInfo.id == row.defaultTallyAccountId>
						<#if accountInfo??>
						"hasAccount":true,
						<#else>
						"hasAccount":false,
						</#if>
						
						"personalName":"${accountInfo.personalName!""}",
						"personalMobile":"${accountInfo.personalMobile!""}",
						"personalIdCard":"${accountInfo.personalIdCard!""}",
						"companyName":"${accountInfo.companyName!""}",
						"companyTel":"${accountInfo.companyTel!""}",
						"accountNo":"${accountInfo.accountNo!""}",
						"totalAmount":"${accountInfo.totalAmount?string("##0.0000")!""}",
						"freezeAmount":"${accountInfo.freezeAmount?string("##0.0000")!""}",
						"realAmount":"${accountInfo.realAmount?string("##0.0000")!""}",
						"todayIncome":"${accountInfo.todayIncome?string("##0.0000")!""}",
						"todayExpend":"${accountInfo.todayExpend?string("##0.0000")!""}",
						"cashPledgeAccountAmount":"${accountInfo.cashPledgeAccountAmount?string("##0.0000")!""}",
						"accountReceiveAmount":"${accountInfo.accountReceiveAmount?string("##0.0000")!""}",
						"plannedAccountReceiveAmount":"${accountInfo.plannedAccountReceiveAmount?string("##0.0000")!""}",
						"dueAccountReceiveAmount":"${accountInfo.dueAccountReceiveAmount?string("##0.0000")!""}",
						"accountPayerbleAmount":"${accountInfo.accountPayerbleAmount?string("##0.0000")!""}",
						"plannedAccountPayerbleAmount":"${accountInfo.plannedAccountPayerbleAmount?string("##0.0000")!""}",
						"dueAccountPayerbleAmount":"${accountInfo.dueAccountPayerbleAmount?string("##0.0000")!""}",
					</#if>
				</#list>
				"accountType":"${row.accountType.desc!""}"
			}
			<#if row_has_next>,</#if>
		</#list>
	]
}
</#escape>